package com.kid.keep.enums;

import com.honeybee.cloud.framework.base.exception.ExceptionEnum;
import lombok.Getter;

/**
 * @Description 异常enums
 * @Author DELL
 * @Create 2019-12-08
 * @Since 1.0.0
 */
public enum BizExceptionEnum {
    NAME_EXISTS(1, "名称已存在"),
    ID_NOT_EXISTS(2, "信息不正确"),
    CHECK_ITEM_EXISTS(3, "有未完成的评测"),
    CHECK_ITEM_NOT_EXISTS(4, "无评测项"),
    REPORT_NOT_EXISTS(5, "测评记录不存在"),
    NO_CHECK_ITEM(6, "无此评测项"),
    NO_CHECK_ITEM_STANDARD(7, "无检测结果标准"),
    NO_GRADE(8, "无法评定检测结果"),
    HAS_RESULT(9, "已测评"),
    REPORT_STATUS_INVALID(10, "测评记录状态不正确"),
    NO_CHECK_ITEM_RESULT(11, "无评测项结果"),
    NO_All_CHECK_ITEM_EXISTS_RESULT(12, "有评测项未进行"),
    CAN_NOT_CALCULATION(13, "无法计算结果"),
    GRADE_NOT_EXISTS(14, "无法计算等级"),
    STATISTICS_DATE_TYPE_INVALID(15, "统计时间类型不正确"),
    AGE_NOT_MATCH(16, "暂不支持此年龄段"),
    LOGIN_INVALID(17, "授权异常"),
    EXIST_SCOPE(18, "有测试成绩");
    @Getter
    private Integer parentCode = ExceptionEnum.BIZ.getCode();
    @Getter
    private Integer subCode;
    @Getter
    private String message;


    BizExceptionEnum(Integer subCode, String message) {
        this.subCode = subCode;
        this.message = message;
    }

    public String getParentMessage() {
        return ExceptionEnum.BIZ.getRemark();
    }
}
